<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工作门户主页面</title>
    <script src="../../js/header.js"></script>
    <link rel="stylesheet" type="text/css" href="../../css/main_work.css">
    <style>
    	.el-tooltip__popper {
	  		max-width: 800px;		
		}
    </style>
</head>
<body>
<div v-cloak id="sy" style="overflow: auto;" ref="syHeight">
    <el-row type="flex" justify="center" style="margin-top: 20px;">
        <el-col :span="15">
            <el-row v-show="!showSearchContent">
                <el-col>
                    <el-breadcrumb separator-class="el-icon-arrow-right">
                        <el-breadcrumb-item class="crumb-to" @click.native="recoverySy()">首页</el-breadcrumb-item>
                        <el-breadcrumb-item v-for="item in breadcrumb">{{ item.crumbname }}</el-breadcrumb-item>
                    </el-breadcrumb>
                </el-col>
            </el-row>
            <el-row :gutter="20" :style="{ 'marginTop': !showSearchContent?'20px':'0' }">
                <el-col>
                    <div style="padding: 1% 1% 0;background: rgba(48, 119, 201,0.52);">
                        <div class="search-tab">
                            <el-tabs v-model="searchTitle" @tab-click="changeIsPublic">
                                <el-tab-pane label="公开公告" name="gonggao"></el-tab-pane>
                                <el-tab-pane label="标准规范" name="biaozhun"></el-tab-pane>
                                <el-tab-pane label="监管事项清单" name="qingdan"></el-tab-pane>
                            </el-tabs>
                        </div>
                        <div class="search-input">
                            <el-input
                                    placeholder="请输入内容"
                                    suffix-icon="el-icon-search"
                                    @keyup.enter.native="submitSearch"
                                    v-model="inputsearch"/>
                        </div>
                        <div style="width: 100%;height: 5px;background-image: linear-gradient(-55deg, #4BA3EB 0%, #1665A7 100%);"></div>
                    </div>
                </el-col>
            </el-row>
        </el-col>
    </el-row>
    <div
        v-loading="loading"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.8)">
        <el-row v-show="showSearchContent" type="flex" justify="center" style="margin-top: 20px;">
            <el-col :span="15">
                <el-row :gutter="20">
                    <el-col :span="12">
                        <el-row style="position: relative;">
                            <el-col class="notice_information">
                                <el-tabs v-model="noticeName" @tab-click="changeBz">
                                    <el-tab-pane v-for="item in noticeInformation" :label="item.titlename" :name="item.name">
                                        <div id="publicList" style="display: block;height: 145px;">
                                            <ul class="information_contents">
                                                <div v-if="item.child!=null && item.child.length>0">
                                                    <li v-for="list in item.child" style="cursor: pointer;" @click="view(list)">
                                                        <span class="contents">{{ list.title }}</span>
                                                        <span class="date">{{ list.condate }}</span>
                                                    </li>
                                                </div>
                                                <div v-else style="color: #8c939d;line-height: 140px;text-align: center;">
                                                    暂无数据
                                                </div>
                                            </ul>
                                        </div>
                                    </el-tab-pane>
                                </el-tabs>
                                <div v-show="showPublic" class="column_more" style="position: absolute;top: 7px;right: 3px;">
                                    <el-link @click="toPublic()" target="_blank">更多</el-link>
                                </div>
                                <div v-show="showStandard" class="column_more" style="position: absolute;top: 7px;right: 3px;">
                                    <el-link @click="toStandard()" target="_blank">更多</el-link>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row style="margin-top: 33px;">
                            <el-col>
                                <el-row>
                                    <el-col :span="5">
                                        <div class="column_title column_short_title" style="padding: 5px 0;text-align: center;">
                                            消息提醒
                                        </div>
                                    </el-col>
                                    <el-col :span="6" :offset="13" style="line-height: 30px;">
                                        <div class="column_more">
                                            <span></span>
                                        </div>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col>
                                        <div style="position: relative;bottom: 1px;border-bottom: 1px solid #D6D6D6;"></div>
                                    </el-col>
                                </el-row>
                                <el-row :gutter="20" style="margin-top: 17px;">
                                    <el-col>
                                        <el-row :gutter="20" class="notice-content">
                                            <el-col :span="6" v-for="(item,index) in noticeinformation1">
                                                <div id="disbox" class="div-icon" v-if="item.url==''" @click="showdialogzfjg(item,index)" @mouseenter="xxtx_changeImg(item,index)" @mouseleave="xxtx_recovery(item,index)">
                                                    <div class="icon-img" :style="{'background': 'url(' + item.bg + ') center no-repeat'}" >
                                                        <div class="noctice-num">{{ item.num }}</div>
                                                    </div>
                                                </div>
                                                <a :href="item.url" v-else target="_blank" >
                                                        <div class="div-icon"  @mouseenter="xxtx_changeImg(item,index)" @mouseleave="xxtx_recovery(item,index)">
                                                        <div class="icon-img" :style="{'background': 'url(' + item.bg + ') center no-repeat'}" >
                                                            <div class="noctice-num">{{ item.num }}</div>
                                                        </div>
                                                    </div>
                                                </a>
                                                <div style="margin-top: 18px;">
                                                    <span class="message">{{ item.message }}</span>
                                                </div>
                                            </el-col>
                                            <el-col :span="6" v-for="(item,index) in noticeinformation2" v-show="item.show">
                                                <div class="div-icon" @click="changeUrlDb(item,index)" @mouseenter="dbyb_changeImg(item,index)" @mouseleave="dbyb_recovery(item,index)">
                                                    <div class="icon-img" :style="{'background': 'url(' + item.bg + ') center no-repeat'}" >
                                                        <div class="noctice-num">{{ item.num }}</div>
                                                    </div>
                                                </div>
                                                <div style="margin-top: 18px;">
                                                    <span class="message">{{ item.message }}</span>
                                                </div>
                                            </el-col>
                                        </el-row>
                                    </el-col>
                                </el-row>
                            </el-col>
                        </el-row>
                    </el-col>
                    <el-col :span="12">
                        <el-row>
                            <el-col :span="5">
                                <div class="column_title column_short_title" style="padding: 5px 0;text-align: center;">
                                    监管数据仓
                                </div>
                            </el-col>
                            <el-col :span="6" :offset="13" style="line-height: 30px;">
                                <div class="column_more">
                                    <!--<span  @click="jgsx()">更多</span>-->
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col>
                                <div style="position: relative;bottom: 1px;border-bottom: 1px solid #D6D6D6;"></div>
                            </el-col>
                        </el-row>
                        <el-row style="margin-top: 7px;">
                            <el-col>
                                <el-row :gutter="10" v-for="(item,index) in jianguancang" style="margin-top: 10px;">
                                    <el-col :span="12" v-for="list in item.child">
                                        <a :href="list.url" target="_self"  @click="showcheckdialog(list.url)">
                                            <div class="jianguancang-col" @mouseenter="jgc_changeImg(list,index)" @mouseleave="jgc_recovery(list,index)">
                                                <div class="jianguancang-img" :style="{'background': 'url(' + list.img + ') center no-repeat'}"></div>
                                                <div style="height: 100%;">
                                                    <div class="jianguancang-content">
                                                        <div>
                                                            <span class="jianguancang-num">{{ list.num }}</span>
                                                        </div>
                                                        <div style="margin: 7px 0;width: 100%;height: 2px;background-color: #DEDEDE;"></div>
                                                        <div>
                                                            <span class="jianguancang-name">{{ list.name }}</span>
                                                        </div>
                                                    </div>
                                                    <div class="jianguancang-name" style="display: inline-block;font-size: 18px;">
                                                        <span class="jianguancang-unit">个</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </a>
                                    </el-col>
                                </el-row>
                            </el-col>
                        </el-row>
                    </el-col>
                </el-row>
            </el-col>
        </el-row>
        <el-row v-show="showSearchContent" type="flex" justify="center" style="margin-top: 18px;">
            <el-col :span="15">
                <el-row :gutter="20">
                    <el-col :span="12">
                        <el-row>
                            <el-col :span="5">
                                <div class="column_title column_short_title" style="padding: 5px 0;text-align: center;">
                                    统计分析
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col>
                                <div style="position: relative;bottom: 1px;border-bottom: 1px solid #D6D6D6;"></div>
                            </el-col>
                        </el-row>
                        <el-row style="margin-top: 14px;background: #FFFFFF;border: 1px solid #D6D6D6;">
                            <el-col>
                                <el-row>
                                   <!-- <el-col :span="6" style="padding-left: 30px;">
                                        <span>年度:</span>
                                        <el-input
                                                v-model="fileYear"
                                                type="year"
                                                format="yyyy"
                                                value-format="yyyy"
                                                @change="changeYear">
                                          </el-input>
                                        </el-form-item>
                                    </el-col>-->
                                    <el-col>
                                        <div id="echarts3" style="width: 90%;height:288px;"></div>
                                    </el-col>
                                </el-row>
                            </el-col>
                        </el-row>

                    </el-col>
                    <el-col :span="12">
                        <el-row>
                            <el-col :span="8">
                                <div class="column_title column_short_title" style="padding: 5px 0;text-align: center;text-indent: -10px;">
                                    监管事项目录清单
                                </div>
                            </el-col>
                            <el-col :span="6" :offset="10" style="line-height: 30px;">
                                <div class="column_more">
                                    <span @click="jgsx()">更多</span>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col>
                                <div style="position: relative;bottom: 1px;border-bottom: 1px solid #D6D6D6;"></div>
                            </el-col>
                        </el-row>
                        <el-row class="table-font" style="margin-top: 17px;">
                           <!-- <el-table
                                    :data="tableData"
                                    border
                                    :show-header="showHeader"
                                    style="width: 100%">
                                <el-table-column>
                                    <template slot-scope="scope">
                                        <i class="el-icon-document"></i>
                                        <span class="content-font" @click="viewSupervision(scope.row)">{{ scope.row.supervisionName }}</span>
                                    </template>
                                </el-table-column>
                            </el-table>-->
                           <!-- <el-tabs >
                                <el-tab-pane >
                                    <div  style="display: block;height: 182px;width:100px;overflow: hidden">
                                        <ul >
                                            <div v-if="tableData!=null && tableData.length>0">
                                                <li v-for="list in tableData" @click="viewSupervision(list)">
                                                    <span class="contents">{{ list.supervisionName }}</span>
                                                    <span class="date">{{ list.createTime }}</span>
                                                </li>
                                            </div>
                                            <div v-else style="color: #8c939d;line-height: 282px;text-align: center;">
                                                暂无数据
                                            </div>
                                        </ul>
                                    </div>
                                </el-tab-pane>
                            </el-tabs>-->
                            <el-table
                                    :data="tableData1"
                                    :show-header="showHeader"
                                    style="width: 100%">
                                <el-table-column width="390">
                                    <template slot-scope="scope">
                                        <span class="content-font"
                                              @click="viewSupervision(scope.row)"
                                              style="width:340px;display: inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">
                                             <i class="el-icon-document">&nbsp;&nbsp;</i>{{ scope.row.supervisionName }}</span>
                                    </template>
                                </el-table-column>
                                <el-table-column>
                                    <template slot-scope="scope">
                                        <span class="content-font">{{ scope.row.createTime }}</span>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </el-row>

                    </el-col>
                </el-row>
            </el-col>
        </el-row>
        <el-dialog title="选择系统" :visible.sync="dialogYbView" center width="45%">
            <div style="rgba(0,0,0,0.5)">
                <el-row :gutter="20" class="notice-content">
                    <el-col :span="6" v-for="(item,index) in sysApps" align="middle">
                    <div v-show="item.url!=''" @click="turnYB(item,index)">
                        <div class="div-icon"  @mouseenter="dbybxt_changeImg(item,index)" @mouseleave="dbybxt_recovery(item,index)" center="true">
                            <div class="icon-img" :style="{'background': 'url(' + item.bg + ') center no-repeat'}" >
                                <div class="noctice-num">{{ item.num }}</div>
                            </div>
                        </div>
                        <div style="margin-top: 18px;">
                            <span class="message">{{ item.message }}</span>
                        </div>
                    </div>
                    </el-col>
                </el-row>
            </div>
        </el-dialog>
        <!-- 搜索内容列表 -->
        <!--搜索前提示-->
        <el-row v-show="!showSearchContent && !searchContents" type="flex" justify="center" ref="searchHeight" style="margin-top: 20px;">
            <el-col :span="15" style="margin: 20px 0;">
                <span style="font-size: 15px;color:#666;">请按"回车"键发起检索</span>
            </el-col>
        </el-row>
        <!--查询列表-->
        <el-row v-show="!showSearchContent && searchContents" type="flex" justify="center" ref="searchHeight" style="margin-top: 20px;">
            <el-col :span="15">

                <el-table v-if="isPublic != '2'" :data="tableData" border style="width: 100%;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
                    <el-table-column type="selection" ></el-table-column>
                    <el-table-column
                            prop=""
                            type="index"
                            label="序号"
                            width="80"
                            align="center" >
                    </el-table-column>
                    <el-table-column
                            prop="title"
                            label="标题"
                            show-overflow-tooltip
                            align="center">
                    </el-table-column>
                    <el-table-column
                            prop="releaseTime"
                            label="发布时间"
                            width="100"
                            align="center">
                    </el-table-column>
                    <el-table-column
                            label="操作"
                            width="200"
                            align="center">
                        <template slot-scope="scope">
                            <el-button size="mini" @click="view(scope.row)">查看详情</el-button>
                        </template>
                    </el-table-column>
                </el-table>

                <el-table v-else :data="tableData" border style="width: 100%;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
                    <el-table-column type="selection" ></el-table-column>
                    <el-table-column
                            prop=""
                            type="index"
                            label="序号"
                            width="80"
                            align="center" >
                    </el-table-column>
                    <el-table-column
                            prop="supervisionName"
                            label="监管事项名称"
                            align="center">
                    </el-table-column>
                    <el-table-column
                            prop="createTime"
                            label="创建时间"
                            width="100"
                            align="center">
                    </el-table-column>
                    <el-table-column
                            label="操作"
                            width="200"
                            align="center">
                        <template slot-scope="scope">
                            <el-button size="mini" @click="viewSupervision(scope.row)">查看详情</el-button>
                        </template>
                    </el-table-column>
                </el-table>

                <div style="overflow: hidden;">
                    <div class="pagination">
                        <el-pagination
                                @size-change="handleSizeChange"
                                @current-change="handleCurrentChange"
                                :page-size="pagesize"
                                :current-page="currentPage"
                                :page-sizes="[10]"
                                background
                                layout="total, sizes,prev, pager, next"
                                :total="tableTotal"
                                prev-text="上一页"
                                next-text="下一页">
                        </el-pagination>
                    </div>
                </div>
            </el-col>
        </el-row>

        <!--详情-->
        <el-dialog title="" :visible.sync="dialogView" center fullscreen>
            <gongshi-details :addform="addForm" :link="link"></gongshi-details>
        </el-dialog>

        <!-- 监管事项清单详情 -->
        <el-dialog title="" :visible.sync="dialogSupView" center fullscreen>
            <supervision-details :detail="addsupform" :link="link"></supervision-details>
        </el-dialog>

    </div>
</div>
</body>
<script>
    var sy = new Vue({
        el: '#sy',
        data(){
            return {
                fileYear: '',
                noticeName: 'gongshi',
                searchTitle: 'gonggao',
                isPublic:'0',
                inputsearch: '',
                input1: '',
                dialogView:false,
                dialogSupView : false,
                addsupform : [],
                showHeader: false,
                showSearchContent: true,
                breadcrumb: [
                    { crumbname: '信息查询' }
                ],
                showPublic:true,
                showStandard:false,
                tableData : [],
                tableData1 : [],
                noticeInformation: [
                    {
                        titlename: '公示通报',
                        name: 'gongshi',
                        child: []
                    },
                    {
                        titlename: '标准规范',
                        name: 'biaozhun',
                        child: []
                    }
                ],
                jianguancang: [
                    {
                        child: [
                            {
                                img: appBaseUrl + '/images/监管事项.png',
                                num: '0',
                                name: '监管事项清单',
                                url: './jgsjc/supervision.html'
                            },
                            {
                                img: appBaseUrl + '/images/监管对象.png',
                                num: '0',
                                name: '监管对象库',
                                url: './jgsjc/apunit.html'
                            }
                        ]
                    },
                    {
                        child: [
                            {
                                img: appBaseUrl + '/images/执法人员.png',
                                num: '0',
                                name: '执法人员库',
                                url: './jgsjc/lawerperson.html'
                            },
                            {
                                img: appBaseUrl + '/images/xinyong-icon.png',
                                num: '0',
                                name: '信用信息库',
                                url: './jgsjc/unitCreditInformation.html'
                            }

                        ]
                    },
                    {
                        child: [
                            {
                                img: appBaseUrl + '/images/总管行为.png',
                                num: 0,
                                name: '监管行为',
                                url : 'javascript:void(0)'
                            },
                            {
                                img: appBaseUrl + '/images/投诉建议.png',
                                num: '0',
                                name: '投诉建议',
                                url: './jgsjc/complaint.html'
                            }
                        ]
                    },
                    /*{
                        child: [
                            {
                                img: appBaseUrl + '/images/知识库.png',
                                num: '14172',
                                name: '知识库',
                                url: ''
                            },
                            {
                                img: appBaseUrl + '/images/文献典籍.png',
                                num: '56872',
                                name: '文献典籍',
                                url: ''
                            }
                        ]
                    }*/
                ],
                noticeinformation1: [
                    {
                         url: '',
                         bg: appBaseUrl + '/images/xinyong-icon.png',
                         message: '执法监管',
                         num: '0'
                     },
                     {
                         url: '',
                         bg: appBaseUrl + '/images/fengxian-icon.png',
                         message: '风险预警',
                         num: '0'
                     }
                ],
                noticeinformation2: [
                    {
                        show:true,
                        bg: appBaseUrl + '/images/daiban-icon.png',
                        message: '待办任务',
                    },
                    {
                        show:true,
                        bg: appBaseUrl + '/images/yiban-icon.png',
                        message: '已办任务',
                    }
                ],
                noticetype:[
                    {
                        url: '',
                        bg: appBaseUrl + '/images/renlingchaoshi-icon.png',
                        message: '认领超时提醒',
                        num: '0'
                    },
                    {
                        url: '',
                        bg: appBaseUrl + '/images/renlingchaoxian-icon.png',
                        message: '未认领超限提醒',
                        num: '0'
                    }
                ],
                pagesize: 10,
                currentPage: 1,
                loading: false,
                dialogView: false,
                addForm: [],
                link: '',
                sysApp:'',
                sysApps:[
                {
                    url: '',
                    bg: appBaseUrl + '/images/安评系统02.png',
                    message: '安评系统',
                    num: ''
                },
                {
                    url: '',
                    bg: appBaseUrl + '/images/监测设施系统02.png',
                    message: '地震监测设施监管系统',
                    num: ''
                },
                    {
                        url: '',
                        bg: appBaseUrl + '/images/宣传教育系统02.png',
                        message: '地震抗震防灾宣传教育系统',
                        num: ''
                    }
                ],
                menuPermission:'',
                role:'',
                positionName:'',
                name:'',
                dialogSysDB:false,
                dialogSysYB:false,
                //role:['执法监管消息管理员','风险预警消息管理员']
                nums:[],
                city: {
                    cityName: '',
                    cityNum: '' ,
                    cityObject:'' , // 监管对象数据
                    cityAction: '', // 监管行为数据
                    cityEducation: '', // 宣传教育数据
                    cityCounts:0,
                    cityTotal:0,
                },
            }
        },
        mounted(){
            this.mapFn();//已检测 正常
            this.getPublic();//已检测 正常
            this.getSupervision();//已检测 正常
            this.getStandard();
            this.num();//已检测 修改
            this.num1();//已检测 修改
            this.getApp();//已检测 修改
            this.getSupervisionNum();//已检测 修改
            this.getApunitNum();//已检测 修改
            this.getAppealNum();//已检测 修改(查询失败问题)
            this.getSum();//已检测 修改
            this.getLawerNum();//已检测 修改
            this.getXYNum();//已检测 修改
        },
        watch: {
            inputsearch(val){
                if(val != ''){
                    this.showSearchContent = false;
                }else{
                    this.searchContents = false;
                    this.recoverySy();
                }
            },
            searchTitle(){
                this.searchContents = false;
            },
        },
        created: function () {
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            this.name = userInfo.loginName;
            this.sysApp=userInfo.sysApp;
            console.log(this.sysApp);
            this.menuPermission = userInfo.menuPermission;
            this.role=userInfo.role;//角色
            this.positionName=userInfo.positionName;//岗位 安评备案审批岗
            this.chooseSys();

            let date=new Date();
            let year=date.getFullYear().toString();
            this.fileYear=year;
        },
        methods: {
            /*公示通报和标准规范切换*/
            changeBz(tab, event){
                if(this.noticeName=="gongshi"){
                    this.showPublic=true;
                    this.showStandard=false;
                    this.getPublic();
                }else if(this.noticeName=="biaozhun"){
                    this.showPublic=false;
                    this.showStandard=true;
                    this.getStandard();
                }
            },
            /*标准规范和公式查询切换*/
            changeIsPublic(tab, event){
                if(this.searchTitle=="gonggao"){
                    this.isPublic='0';
                }else if(this.searchTitle=="biaozhun"){
                    this.isPublic='1';
                }else if(this.searchTitle=="qingdan"){
                    this.isPublic='2';
                }
            },
            /*监管数据仓行为监管*/
            showcheckdialog(url){
                if(url =='javascript:void(0)') {
                    parent.mainwork.openDialog('checkdialog',this.nums);
                }
            },
            /*执法监管和风险预警消息提醒*/
            showdialogzfjg(item,index){
                if(index==0){
                    var flag = false;
                    for(var i=0;i<this.role.length;i++){
                        var js =  this.role[i];
                        if("执法监管消息提醒"==js){
                            flag=true;
                        }
                    }
                    if(flag){
                        if( this.noticetype[0].num !='0'&& this.noticetype[1].num !='0'){
                            parent.mainwork.openDialog('dialogzfjg',this.noticetype);
                            this.dialogzfjg=true;
                        }else if(this.noticetype[0].num !='0'&& this.noticetype[1].num =='0'){
                            window.open(this.noticetype[0].url);
                        }else if(this.noticetype[0].num =='0'&& this.noticetype[1].num !='0'){
                            window.open(this.noticetype[1].url);
                        }else if(this.noticetype[0].num =='0'&& this.noticetype[1].num =='0'){
                            window.open(this.noticetype[0].url);
                        }
                    }else {
                        this.$message.error("无权限操作");
                    }
                }
                if(index==1){
                    var flag = false;
                    for(var i=0;i<this.role.length;i++){
                        var js =  this.role[i];
                        if("风险预警消息提醒"==js){
                            flag=true;
                        }
                    }
                    if(flag){
                        window.open(this.noticeinformation1[1].url);
                    }else {
                        this.$message.error("无权限操作");
                    }
                }
            },
            mapFn() {
                var dataList;
                var myChart = echarts.init(document.getElementById('echarts3'));
                var $this = this;
                axios({
                    method: 'get',
                    url: '/dzjportal/apUnitInfo/map',
                    params:{
                        year:$this.fileYear
                    }
                }).then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    dataList = JSON.parse(data.data);
                    $this.city.cityTotal = JSON.parse(data.cityTotal);
                    $this.city.cityNum=JSON.parse(data.cityTotal);
                    myChart.setOption({
                        tooltip: {
                            formatter: function(params) {
                                if (params.value) {
                                    return params.seriesName + '<br/>' + params.name + ' : ' + params.value;
                                } else {
                                    return params.seriesName + '<br/>' + params.name + ' : ' + '0';
                                }
                            } //数据格式化
                        },
                        visualMap: {
                            min: 0,
                            max: 1500,
                            left: 'left',
                            top: 'bottom',
                            text: ['高', '低'], //取值范围的文字
                            inRange: {
                                color: ['#e0ffff', '#006edd'] //取值范围的颜色
                            },
                            show: false //图注
                        },
                        geo: {
                            map: 'china',
                            roam: false, //不开启缩放和平移
                            zoom: 1.2, //视角缩放比例
                            label: {
                                normal: {
                                    show: true,
                                    fontSize: '10',
                                    color: 'rgba(0,0,0,0.7)'
                                }
                            },
                            itemStyle: {
                                normal: {
                                    borderColor: 'rgba(0, 0, 0, 0.2)'
                                },
                                emphasis: {
                                    areaColor: '#F3B329', //鼠标选择区域颜色
                                    shadowOffsetX: 0,
                                    shadowOffsetY: 0,
                                    shadowBlur: 20,
                                    borderWidth: 0,
                                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                                }
                            }
                        },
                        series: [{
                            name: '信息量',
                            type: 'map',
                            geoIndex: 0,
                            data: dataList
                        }]
                    });
                } else {
                    this.$message.error(data.msg);
                }
            }).catch(function(error) {
                    console.log(error);
                });
                window.onresize = () => {
                    myChart.resize();
                }
                // 地图点击事件
                myChart.on('click', function(params) {
                    console.log(params);
                    $this.city.cityName = params.name;
                    if(params.value){
                        $this.city.cityCounts = params.value;
                    }else{
                        $this.city.cityCounts = 0;
                    }
                    parent.mainwork.openDialog('dialogTableVisible',$this.city);
                });
            },
       /*     bzt(){
                var myChart = echarts.init(document.getElementById('echarts3'));
                option = {
                    tooltip: {
                        trigger: 'item',
                        formatter: "{b} : {c} ({d}%)"
                    },
                    color: ['#2897EE', '#78BFFF', '#79E4D8', '#809BCE'],
                    legend: {
                        orient: 'vertical',
                        top: 'center',
                        left: 'right',
                        align: 'left',
                        data: ['秘书二处','办公厅领导','城管环保局','市办']
                    },
                    series : [
                        {
                            type: 'pie',
                            center: ['40%', '50%'],
                            data:[
                                {value:335, name:'秘书二处'},
                                {value:310, name:'办公厅领导'},
                                {value:234, name:'城管环保局'},
                                {value:135, name:'市办'}
                            ],
                            // 饼状图上的文本标签（引导线）
                            label: {
                                normal: {
                                    show : false,
                                    position: 'inside' // 标签的位置
                                }
                            },
                            itemStyle: {
                                // 扇区之间的间距
                                borderWidth: 5,
                                borderColor: '#fff',
                                emphasis: {
                                    shadowBlur: 10,
                                    shadowOffsetX: 0,
                                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                                }
                            }
                        }
                    ]
                };
                //根据屏幕尺寸大小图表自适应
                window.onresize = function() {
                    myChart.resize();
                };
                myChart.setOption(option);
            },*/
            jgsx(){
            	parent.mainwork.setIframeHeight(940);
                parent.mainwork.changePage('./jgsx/jgsx.html');
            },
            xxtx_changeImg(item,index){
                if(index == 0){
                    item.bg = appBaseUrl + "/images/xinyong-icon-on.png";
                }else{
                    item.bg = appBaseUrl + "/images/fengxian-icon-on.png";
                }
            },
            dbyb_changeImg(item,index){
                if(index == 0){
                    item.bg = appBaseUrl + "/images/daiban-icon-on.png";
                }else{
                    item.bg = appBaseUrl + "/images/yiban-icon-on.png";
                }
            },
            xxtx_recovery(item,index){
                if(index == 0){
                    item.bg = appBaseUrl + "/images/xinyong-icon.png";
                }else{
                    item.bg = appBaseUrl + "/images/fengxian-icon.png";
                }
            },
            dbyb_recovery(item,index){
                if(index == 0){
                    item.bg = appBaseUrl + "/images/daiban-icon.png";
                }else{
                    item.bg = appBaseUrl + "/images/yiban-icon.png";
                }
            },
            /*changeUrlOther(item,index){
                localStorage.setItem('changeUrl','123');
            },*/
            /*待办已办按钮权限控制*/
            chooseSys(){
                var flag = false;
                var ybFlag = false;
                for(var i=0;i<this.role.length;i++){
                    var js =  this.role[i];
                    if("待办消息"==js){
                        flag=true;
                    }
                    if ("已办消息"==js){
                        ybFlag=true;
                    }
                }
                if(flag){
                    for(var i=0;i<this.noticeinformation2.length;i++){
                        this.noticeinformation2[0].show=true;
                    }
                }else {
                    for(var i=0;i<this.noticeinformation2.length;i++){
                        this.noticeinformation2[0].show=false;
                    }
                }
                if(ybFlag){
                    for(var i=0;i<this.noticeinformation2.length;i++){
                        this.noticeinformation2[1].show=true;
                    }
                }else {
                    for(var i=0;i<this.noticeinformation2.length;i++){
                        this.noticeinformation2[1].show=false;
                    }
                }
            },
            /*点击按钮进待办已办*/
            changeUrlDb(item, index) {
                if (index == 0) {
                   if(this.sysApp.length>1){
                       parent.mainwork.openDialog('dialogDbView',this.sysApps);
                    }else {
                       debugger;
                       for (var i=0;i<this.sysApps.length;i++) {
                           if(this.sysApps[i].url !="" && this.sysApps[i].url != null){
                               window.open(this.sysApps[i].url+"?menuPermissionDB=db");
                           }
                       }
                    }
                } else {
                    if(this.sysApp.length>1){
                        parent.mainwork.openDialog('dialogYbView',this.sysApps);
                    }else {
                        for (var i=0;i<this.sysApps.length;i++) {
                            if(this.sysApps[i].url !="" && this.sysApps[i].url != null){
                                window.open(this.sysApps[i].url+"?menuPermissionYB=yb");
                            }
                        }
                    }
                }
            },
            jgc_changeImg(list,index){
                if(index == 0 && list.name=="监管事项清单"){
                    list.img = appBaseUrl + "/images/监管事项-on.png";
                }else if(index == 0 && list.name=="监管对象库"){
                    list.img = appBaseUrl + "/images/监管对象-on.png";
                }else if(index == 1 && list.name=="执法人员库"){
                    list.img = appBaseUrl + "/images/执法人员-on.png";
                }else if(index == 1 && list.name=="知识库"){
                    list.img = appBaseUrl + "/images/知识库-on.png";
                }else if(index == 2 && list.name=="总管行为"){
                    list.img = appBaseUrl + "/images/总管行为-on.png";
                }else if(index == 2 && list.name=="投诉建议"){
                    list.img = appBaseUrl + "/images/投诉建议-on.png";
                }else if(index == 3 && list.name=="信用信息库"){
                    list.img = appBaseUrl + "/images/xinyong-icon-on.png";
                }else if(index == 3 && list.name=="文献典籍"){
                    list.img = appBaseUrl + "/images/文献典籍-on.png";
                }
            },
            jgc_recovery(list,index){
                if(index == 0 && list.name=="监管事项清单"){
                    list.img = appBaseUrl + "/images/监管事项.png";
                }else if(index == 0 && list.name=="监管对象库"){
                    list.img = appBaseUrl + "/images/监管对象.png";
                }else if(index == 1 && list.name=="执法人员库"){
                    list.img = appBaseUrl + "/images/执法人员.png";
                }else if(index == 1 && list.name=="知识库"){
                    list.img = appBaseUrl + "/images/知识库.png";
                }else if(index == 2 && list.name=="总管行为"){
                    list.img = appBaseUrl + "/images/总管行为.png";
                }else if(index == 2 && list.name=="投诉建议"){
                    list.img = appBaseUrl + "/images/投诉建议.png";
                }else if(index == 3 && list.name=="信用信息库"){
                    list.img = appBaseUrl + "/images/xinyong-icon.png";
                }else if(index == 3 && list.name=="文献典籍"){
                    list.img = appBaseUrl + "/images/文献典籍.png";
                }
            },
            // 加载
            loadingTime(){
                this.loading = true;
            },
            // 恢复首页
            recoverySy(){
                this.loadingTime();
                this.showSearchContent = true;
                var $this = this;
                setTimeout(function(){
                    $this.loading = false;
                },1000)
                parent.mainwork.recoveryIframeHeight();
                if(this.inputsearch != ''){
                    this.inputsearch = '';
                }
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.submitSearch();
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.submitSearch();
            },
            // 信息查询--按标题
            submitSearch(){
                var pagesize = 10;
                var pageno = this.currentPage;
                var title = this.inputsearch;
                this.loadingTime();

                this.searchContents = true;
                parent.mainwork.setIframeHeight(923);
                if (this.isPublic=='2'){
                    axios({
                        method: 'get',
                        url: '/dzjportal/supervision/listPage',
                        params: {
                            pageSize: pagesize,
                            pageNo: pageno,
                            supervisionNumber :'',
                            supervisionName : title,
                            supervisionObject : '',
                            permitType:'',
                            supervisionForm : '',
                            publicLocation:'',
                            status:''
                        }
                    })
                        .then(response => {
                            let data = response.data;
                            if (data.code == 200) {
                                let dataInformation = data.data.results;
                                this.tableTotal = data.data.total;// 数据长度
                                this.loading = false; // 停止加载
                                this.tableData = dataInformation;
                            } else {
                                this.$message.error(data.msg);
                            }
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                } else {
                    axios({
                        method: 'get',
                        url: appBaseUrl + '/promulgate/titleList',
                        params: {
                            pageSize: pagesize,
                            pageNo: pageno,
                            title: title,
                            publicType:'1',
                            isPublic: this.isPublic
                        }
                    })
                        .then(response => {
                            let data = response.data;
                            if (data.code == 200) {
                                let dataInformation = response.data.data.results;
                                this.tableTotal = response.data.data.total;// 数据长度
                                this.loading = false; // 停止加载

                                this.tableData = dataInformation;
                            } else {
                                this.$message.error(data.msg);
                            }
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                }

            },
            //公示通报
            toPublic(){
            	parent.mainwork.setIframeHeight(600);
                parent.mainwork.changePage('./public/public.html');
            },
            getPublic(){
                var pagesize =5;
                var pageno = 1;
                axios({
                    method: 'get',
                    url: appBaseUrl + '/promulgate/allList',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        publicType:'1',
                        isPublic:'0'
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let dataInformation = response.data.data.results;
                    this.noticeInformation[0].child = dataInformation;
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },

            getSupervision(){
                var pagesize = 5;
                var pageno = 1;
                axios({
                    method: 'get',
                    url: appBaseUrl + '/supervision/queryPublic',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        publicLocation : '工作'
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let dataInformation = response.data.data.results;
                    this.tableData1=dataInformation;
                    /*if (dataInformation.length==0){
                        document.getElementById("publicList").style.display="none";
                        document.getElementById("publicNo").style.display="block";
                    }*/
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            //查看
            view(list){
                this.dialogView=true;
                this.link=appBaseUrl + "/html/upload/annex.html?uuid="+list.id+"&flag=0&from="+list.from;
                axios({
                    method: 'get',
                    url: appBaseUrl + '/promulgate/selectOne',
                    params: {
                        id: list.id,
                        from:list.from,
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let rowdata = response.data.data;
                    this.addForm = rowdata;
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            // 查看监管事项清单详情
            viewSupervision(row) {
                this.dialogSupView = true;
                axios({
                    method: 'get',
                    url: appBaseUrl + '/supervision/queryById',
                    params: {
                        id: row.id
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let rowdata = response.data.data;
                    this.addsupform = rowdata;
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            //标准规范
            toStandard(){
            	parent.mainwork.setIframeHeight(600);
                parent.mainwork.changePage('./standard/standard.html');
            },
            getStandard(){
                var pagesize =10;
                var pageno = 1;
                axios({
                    method: 'get',
                    url: appBaseUrl + '/promulgate/allList',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        publicType:'1',
                        isPublic:'1',
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let dataInformation = response.data.data.results;
                            this.noticeInformation[1].child=dataInformation;
                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            num(){
                axios({
                    method: 'get',
                    url: '/dzjportal/taskinfo/getOvertimeCount',
                }).then(response => {
                    if (response.data.code == 200) {
                    var num = response.data.data;// 数据长度
                    if(num >99){
                        this.noticetype[0].num='99+';
                    }else{
                        this.noticetype[0].num=num;
                    }

                } else {
                    this.$message.error(data.msg);
                }
            })
            },
            num1(){
                axios({
                    method: 'get',
                    url: '/dzjportal/taskinfo/getOveramountCount',
                }).then(response => {
                    if (response.data.code == 200) {
                    var num = response.data.data;// 数据长度
                    if(num >99){
                        this.noticetype[1].num='99+';
                    }else{
                        this.noticetype[1].num=num;
                    }
                    if( this.noticetype[0].num !='99+'&& this.noticetype[1].num !='99+'){
                        this.noticeinformation1[0].num =  (+this.noticetype[0].num )+ (+this.noticetype[1].num);
                    }else{
                        this.noticeinformation1[0].num='99+';
                    }
                } else {
                    this.$message.error(data.msg);
                }
            })
            },
            num2(){
                axios({
                    method: 'get',
                    url: '/dzjportal/acquierinfo/getAccount',
                }).then(response => {
                    if (response.data.code == 200) {
                    var num = response.data.data;// 数据长度
                    if(num >99){
                        this.noticeinformation1[1].num='99+';
                    }else if(num !=""){
                        this.noticeinformation1[1].num=num;
                    }
                } else {
                    this.$message.error(data.msg);
                }
            })
            },
            getApp(){
                axios({
                    method: 'get',
                    url: appBaseUrl + '/sys/getsys',
                }).then(response => {
                    let data = response.data.data;
                    for (i=0;i<data.length;i++){
                        if(data[i].appName=="执法监管系统"){
                            this.noticetype[0].url=data[i].appAddress+'?u=1';
                            this.noticetype[1].url=data[i].appAddress+'?u=2';
                        }
                        if(data[i].appName=="风险预警系统"){
                            this.num2();
                            this.noticeinformation1[1].url=data[i].appAddress+'?u=1';
                        }
                        if (data[i].appName=='安评系统'){
                            this.sysApps[0].url=data[i].appAddress;
                        }else if(data[i].appName=='地震监测设施监管系统'){
                            this.sysApps[1].url=data[i].appAddress;
                        }else if(data[i].appName=='地震抗震防灾宣传教育系统'){
                            this.sysApps[2].url=data[i].appAddress;
                        }
                    }
                   })

            },
            // 监管数据仓获取监管事项清单数量
            getSupervisionNum() {
                axios({
                    method: 'get',
                    url: '/dzjportal/supervision/superCount',
                }).then(response => {
                    if (response.data.code == 200) {
                        this.jianguancang[0].child[0].num = response.data.data;// 数据长度

                    } else {
                        this.$message.error(data.msg);
                    }
                })
            },
            // 监管数据仓获取安评单位数量
            getApunitNum() {
                axios({
                    method: 'get',
                    url: '/dzjportal/apUnitInfo/getTotalCount',
                }).then(response => {
                    if (response.data.code == 200) {
                        this.jianguancang[0].child[1].num = response.data.data;// 数据长度

                    } else {
                        this.$message.error(response.data.msg);
                    }
                })
            },
            // 监管数据仓获取投诉数量
            getAppealNum() {
                axios({
                    method: 'get',
                    url: '/dzjportal/compaint/getAppealCount',
                }).then(response => {
                    if (response.data.code == 200) {
                        this.jianguancang[2].child[1].num = response.data.data;// 数据长度

                    } else {
                        this.$message.error(response.data.msg);
                    }
                })
            },
            // 监管数据仓获取执法人员数量
            getLawerNum() {
                axios({
                    method: 'get',
                    url: '/dzjportal/ApExecutorInfo/allList',
                    params:{
                        pageSize : 10,
                        pageNo : 1
                    }
                }).then(response => {
                    if (response.data.code == 200) {
                        this.jianguancang[1].child[0].num = response.data.data.total;// 数据长度

                    } else {
                        this.$message.error(data.msg);
                    }
                })
            },
            // 监管数据仓获取信用信息数量
            getXYNum() {
                axios({
                    method: 'get',
                    url: '/dzjportal/creditinfobase/gettotalnum',
                }).then(response => {
                    if (response.data.code == 200) {
                        this.jianguancang[1].child[1].num = response.data.data;// 数据长度

                    } else {
                        this.$message.error(data.msg);
                    }
                })
            },
            //监管行为的总数
            getSum(){
                axios({
                    method: 'get',
                    url: '/dzjportal/getAction/getAllNum',
                }).then(response => {
                    if (response.data.code == 200) {
                    this.jianguancang[2].child[0].num = response.data.sum;// 数据长度
                    this.nums[0]=response.data.obCheck;// 数据长度
                    this.nums[1]=response.data.obPunish;// 数据长度
                    this.nums[2]=response.data.obForce;// 数据长度
                    this.nums[3]=response.data.obOther;// 数据长度

                } else {
                    this.$message.error(response.data.msg);
                }
            })
            }
        }
    })
</script>
</html>